import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
Vue.use(VueRouter);
// 解决点击相同路由的报错问题
// 捕获push replace中的错误
// 当然在replace中的错误也是可以相同的进行捕获
const originalPush = VueRouter.prototype.push;
const originalReplace = VueRouter.prototype.replace;
// push
VueRouter.prototype.push = function push(location, onResolve, onReject) {
  if (onResolve || onReject) {
    return originalPush.call(this, location, onResolve, onReject);
  }
  return originalPush.call(this, location).catch((err) => err);
};
// replace
VueRouter.prototype.replace = function replace(location, onResolve, onReject) {
  if (onResolve || onReject) {
    return originalReplace.call(this, location, onResolve, onReject);
  }
  return originalReplace.call(this, location).catch((err) => err);
};
const routes = [
  {
    name: "Ksh",
    path: '/ksh',
    meta: {
      title: '榆林市公共资源交易平台数字见证大厅'
    },
    component: () => import('@/views/witness/weeon/kshdp/Ksh.vue')
  },
  {
    name: "DP1",
    path: '/DP1',
    meta: {
      title: 'DP1'
    },
    component: () => import('@/views/witness/pageViewBig/one/index.vue')
  },
  {
    name: "DP2",
    path: '/DP2',
    meta: {
      title: 'DP2'
    },
    component: () => import('@/views/witness/pageViewBig/two/index.vue')
  },
  {
    name: "DP3",
    path: '/DP3',
    meta: {
      title: 'DP3'
    },
    component: () => import('@/views/witness/pageViewBig/three/index.vue')
  },
  {
    name: "DP4",
    path: '/DP4',
    meta: {
      title: 'DP4'
    },
    component: () => import('@/views/witness/pageViewBig/first/index.vue')
  },
  {
    name: "pageList",
    path: '/pageList',
    meta: {
      title: 'pageList'
    },
    component: () => import('@/views/witness/pageViewBig/pageList/index.vue')
  },
  {
    name: "pageLive",
    path: '/pageLive',
    meta: {
      title: 'pageLive'
    },
    component: () => import('@/views/witness/pageViewBig/pageLive/index.vue')
  },
  
  {
    name: "pageTrack",
    path: '/pageTrack',
    meta: {
      title: 'pageTrack'
    },
    component: () => import('@/views/witness/pageViewBig/pageTrack/index.vue')
  },
  {
    name: "Media",
    path: "/Media",
    meta: {
      title: "查看视频",
      key: "Media"
      // props: (route) => ({
      //   bidSectionCode: route.query.bidSectionCode,
      //   witnessLinkCode: route.query.witnessLinkCode,
      //   projectCode: route.query.projectCode,
      // }),
    },
    component: () => import("../views/media/index.vue")
  },
  {
    name: "Login",
    path: "/Login",
    meta: {
      title: "登录",
      key: "Login"
    },
    component: () => import("../views/Login.vue")
  },
  // {
  //   name: "Test",
  //   path: "/Test",
  //   meta: {
  //     title: "测试",
  //     key: "Test"
  //   },
  //   component: () => import("../views/Test.vue")
  // },
  {
    path: "/",
    // redirect: { name: "witness" }, // 页面重定向到场所管理模块
    name: "Home",
    component: Home,
    // redirect: { name: "witness" },
    children: [
      {
        name: "witness",
        path: "/witness",
        meta: {
          title: "见证任务",
          key: "witness",
          fatherName: "",
          sidebarShow: false // 是否显示侧边栏
        },
        // redirect: { name: "ManageList" },
        component: {
          render: (c) => c("router-view")
        },
        children: [
          {
            name: "pageVideoWitness",
            path: "pageVideoWitness",
            meta: {
              title: "视频见证",
              key: "pageVideoWitness",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/pageVideoWitness/index.vue"
              )
          },
          {
            name: "pageBehaviorTrace",
            path: "pageBehaviorTrace",
            meta: {
              title: "轨迹见证",
              key: "pageBehaviorTrace",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/pageBehaviorTrace/index.vue"
              )
          },
          {
            name: "ManageList",
            path: "/ManageList",
            meta: {
              title: "见证任务管理",
              key: "ManageList",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/ManageList.vue"
              )
          },
          // 等见证任务管理开发完成后，就干掉上面的链接及文件
          {
            name: "WitnessTaskManagement",
            path: "/WitnessTaskManagement",
            meta: {
              title: "见证任务管理",
              key: "WitnessTaskManagement",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "WitnessTaskManagement" */
                "../views/witness/WitnessTaskManagement/index.vue"
              ),
            children: [
              {
                name: "WitnessTaskAssign",
                path: "WitnessTaskAssign",
                meta: {
                  keepAlive: true,
                  title: "见证任务分配",
                  fatherTitle: "见证任务管理",
                  key: "WitnessTaskAssign",
                  fatherName: "WitnessTaskManagement",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTaskManagement" */
                    "../views/witness/WitnessTaskManagement/WitnessTaskAssign/WitnessTaskAssign.vue"
                  )
              },
              {
                name: "WitnessTaskView",
                path: "WitnessTaskView",
                meta: {
                  keepAlive: true,
                  title: "见证任务查看",
                  fatherTitle: "见证任务管理",
                  key: "WitnessTaskView",
                  fatherName: "WitnessTaskManagement",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTaskManagement" */
                    "../views/witness/WitnessTaskManagement/WitnessTaskView/WitnessTaskView.vue"
                  )
              },
              {
                name: "WitnessRecordApprove",
                path: "WitnessRecordApprove",
                meta: {
                  keepAlive: true,
                  title: "见证记录审核",
                  fatherTitle: "见证任务管理",
                  key: "WitnessRecordApprove",
                  fatherName: "WitnessTaskManagement",
                  sidebarShow: true // 是否显示侧边栏
                  // keepAlive: true, //需要被缓存
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTaskManagement" */
                    "../views/witness/WitnessTaskManagement/WitnessRecordApprove/WitnessRecordApprove.vue"
                  )
              },
              {
                name: "AddWitnessTask",
                path: "AddWitnessTask",
                meta: {
                  title: "新增见证任务",
                  fatherTitle: "见证任务管理",
                  key: "AddWitnessTask",
                  fatherName: "WitnessTaskManagement",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTaskManagement" */
                    "../views/witness/WitnessTaskManagement/AddWitnessTask.vue"
                  )
              },
              {
                name: "ViewingWitnessData-gly",
                path: "ViewingWitnessData",
                meta: {
                  title: "查看见证资料",
                  fatherTitle: "见证任务管理",
                  key: "ViewingWitnessData-gly",
                  fatherName: "WitnessTaskManagement",
                  sidebarShow: true, // 是否显示侧边栏
                  props: (route) => ({ query: route.query.id })
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/ViewingWitnessData.vue"
                  )
              },
              {
                name: "WitnessTable",
                path: "WitnessTable",
                meta: {
                  title: "见证工作台",
                  key: "WitnessTable",
                  fatherName: "WitnessTaskManagement",
                  sidebarShow: true // 是否显示侧边栏
                },
                props: (route) => ({ query: route.query.id }),
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTaskManagement" */
                    "../../gz_plugin/Workbench.vue"
                  )
              }
            ]
          },
          // TODEL:
          {
            name: "TaskList",
            path: "/TaskList",
            meta: {
              title: "见证任务",
              key: "TaskList",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/TaskList.vue"
              )
          },
          // 查看附件-见证人员
          {
            name: "Attachment",
            path: "/WitnessTask/Attachment",
            meta: {
              title: "查看附件",
              fatherTitle: "我的见证",
              key: "Attachment",
              fatherName: "WitnessTask",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "WitnessTask" */
                "../views/witness/Attachment.vue"
              )
          },
          // 查看附件， 见证管理员
          {
            name: "Attachment-gly",
            path: "/WitnessTaskManagement/Attachment",
            meta: {
              title: "查看附件",
              fatherTitle: "我的见证",
              key: "Attachment-gly",
              fatherName: "WitnessTaskManagement",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "WitnessTask" */
                "../views/witness/Attachment.vue"
              )
          },
          {
            name: "witness-location",
            path: "/witness-location",
            meta: {
              keepAlive: true,
              title: "实时定位",
              fatherTitle: "实时定位",
              key: "witness-location",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: ()=> import("@/views/witness/pageLiveWitness/index.vue"),
            children:[
             
            ],
          },
          {
            name: "wintessquery",
            path: "/wintessquery",
            meta: {
              keepAlive: true,
              title: "见证统计",
              fatherTitle: "我的见证",
              key: "wintessquery",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: ()=> import("@/views/witness/pageStats/index.vue"),
            children: [
              {
                name: "viewPer",
                path: "viewPer",
                meta: {
                  keepAlive: true,
                  title: "人员视角",
                  fatherTitle: "见证统计",
                  key: "wintessquery",
                  fatherName: "wintessquery",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: ()=> import("@/views/witness/pageStats/perView/index.vue")
              },
              {
                name: "viewXm",
                path: "viewXm",
                meta: {
                  keepAlive: true,
                  title: "项目视角",
                  fatherTitle: "见证统计",
                  key: "wintessquery",
                  fatherName: "wintessquery",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: ()=> import("@/views/witness/pageStats/xmView/index.vue")
              },
              {
                name: "nowTrajectory",
                path: "nowTrajectory",
                component: ()=> import("@/views/witness/pageStats/nowTrajectory/index.vue"),
                meta: {
                  keepAlive: true,
                  title: "今日项目",
                  fatherTitle: "见证统计",
                  key: "wintessquery",
                  fatherName: "wintessquery",
                  sidebarShow: false // 是否显示侧边栏
                }
               },
               {
                name: "staffTrajectory",
                path: "staffTrajectory",
                component: ()=> import("@/views/witness/pageStats/staffTrajectory/index.vue"),
                meta: {
                  keepAlive: true,
                  title: "工作人员轨迹",
                  fatherTitle: "见证统计",
                  key: "wintessquery",
                  fatherName: "wintessquery",
                  sidebarShow: false // 是否显示侧边栏
                }
               },
               {
                name: "trajectoryPerDetail",
                path: "trajectoryPerDetail",
                component: ()=> import("@/views/witness/pageStats/trajectoryPerDetail/index.vue"),
                meta: {
                  keepAlive: true,
                  title: "人员轨迹查询",
                  fatherTitle: "统计查询",
                  key: "wintessquery",
                  fatherName: "wintessquery",
                  sidebarShow: false // 是否显示侧边栏
                }
               },
               {
                name: "trajectoryXmDetail",
                path: "trajectoryXmDetail",
                component: ()=> import("@/views/witness/pageStats/trajectoryXmDetail/index.vue"),
                meta: {
                  keepAlive: true,
                  title: "项目轨迹查询",
                  fatherTitle: "统计查询",
                  key: "wintessquery",
                  fatherName: "wintessquery",
                  sidebarShow: false // 是否显示侧边栏
                }
               },
               {
                name: "wangerDetail",
                path: "wangerDetail",
                component: ()=> import("@/views/witness/pageStats/wangerDetail/index.vue"),
                meta: {
                  keepAlive: true,
                  title: "告警详情",
                  fatherTitle: "统计查询",
                  key: "wintessquery",
                  fatherName: "wintessquery",
                  sidebarShow: false // 是否显示侧边栏
                }
               }
            ]
          },
          {
            name: "WitnessTask",
            path: "/WitnessTask",
            meta: {
              title: "我的见证",
              key: "WitnessTask",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "WitnessTask" */
                "../views/witness/WitnessTask/index.vue"
              ),
            children: [
              {
                name: "HaveWitnessed",
                path: "HaveWitnessed",
                meta: {
                  keepAlive: true,
                  title: "已完成",
                  fatherTitle: "我的见证",
                  key: "HaveWitnessed",
                  fatherName: "WitnessTask",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTask" */
                    "../views/witness/WitnessTask/HaveWitnessed/HaveWitnessed.vue"
                  )
              },
              {
                name: "ToWitness",
                path: "ToWitness",
                meta: {
                  keepAlive: true,
                  title: "待见证",
                  fatherTitle: "我的见证",
                  key: "ToWitness",
                  fatherName: "WitnessTask",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTask" */
                    "../views/witness/WitnessTask/ToWitness/ToWitness.vue"
                  )
              },
              {
                name: "Witnessing",
                path: "Witnessing",
                meta: {
                  keepAlive: true,
                  title: "见证中",
                  fatherTitle: "我的见证",
                  key: "Witnessing",
                  fatherName: "WitnessTask",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTask" */
                    "../views/witness/WitnessTask/Witnessing/Witnessing.vue"
                  )
              },
              {
                name: "StopWitness",
                path: "StopWitness",
                meta: {
                  keepAlive: true,
                  title: "暂停见证",
                  fatherTitle: "我的见证",
                  key: "StopWitness",
                  fatherName: "WitnessTask",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTask" */
                    "../views/witness/WitnessTask/StopWitness/StopWitness.vue"
                  )
              },
              {
                name: "WitnessReport",
                path: "WitnessReport",
                meta: {
                  keepAlive: false,
                  title: "见证报告",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/WitnessTask/WitnessReport.vue"
                    )
              }
            ]
          },
          {
            name: "PostCalendar",
            path: "/PostCalendar",
            meta: {
              title: "在岗日历",
              key: "PostCalendar",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/PostCalendar.vue"
              )
          },
          {
            name: "WitnessLogController-parent",
            path: "/WitnessLogController",
            meta: {
              title: "操作日志",
              key: "WitnessLogController-parent",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: {
              render: (c) => c("router-view")
            },
            redirect: { name: "WitnessLogController" },
            children: [
              {
                name: "WitnessLogController",
                path: "/WitnessLogController",
                meta: {
                  title: "操作日志",
                  key: "WitnessLogController",
                  fatherName: "WitnessLogController",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/WitnessLogController/WitnessLogController.vue"
                  )
              },
              {
                name: "WitnessLogControllerOperate",
                path: "WitnessLogControllerOperate",
                meta: {
                  title: "项目操作日志",
                  key: "WitnessLogControllerOperate",
                  fatherName: "WitnessLogController",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () => import("../views/witness/WitnessLogController/WitnessLogControllerOperate.vue")
              }
            ]
          },
          {
            name: "System",
            path: "/System",
            meta: {
              title: "系统管理",
              key: "System",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: {
              render: (c) => c("router-view")
            },
            children: [
              {
                name: "TheRules",
                path: "/TheRules",
                meta: {
                  title: "见证规则管理",
                  key: "TheRules",
                  fatherName: "System",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/System/TheRules.vue"
                  )
              },
              {
                name: "systemManagement",
                path: "/systemManagement",
                meta: {
                  title: "见证事项管理",
                  key: "systemManagement",
                  fatherName: "System",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/System/systemManagement.vue"
                  )
              },
              {
                name: "sxgl",
                path: "/sxgl",
                meta: {
                  title: "见证事项",
                  key: "sxgl",
                  fatherName: "System",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/weeon/sxgl/sxgl.vue"
                    )
              },
              {
                name: "allocationRules",
                path: "/allocationRules",
                meta: {
                  title: "分配规则管理",
                  key: "allocationRules",
                  fatherName: "System",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/System/allocationRules.vue"
                  )
              },
              {
                name: "UserManagement",
                path: "/UserManagement",
                meta: {
                  title: "用户管理",
                  key: "UserManagement",
                  fatherName: "System",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/System/UserManagement.vue"
                  )
              },
              {
                name: "warningRule",
                path: "/warningRule",
                meta: {
                  title: "预警规则管理",
                  key: "warningRule",
                  fatherName: "System",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTask" */
                    "../views/witness/System/warningRule/engineeringBuild.vue"
                  )
              }
              // {
              //   name: "WitnessLogController",
              //   path: "/WitnessLogController",
              //   meta: {
              //     title: "见证日志",
              //     key: "WitnessLogController",
              //     fatherName: "System",
              //     sidebarShow: true, // 是否显示侧边栏
              //   },
              //   component: () =>
              //     import(
              //       /* webpackChunkName: "WitnessTask" */
              //       "../views/witness/System/WitnessLogController/WitnessLogController.vue"
              //     ),
              // },
            ]
          },
          {
            name: "Workbench",
            path: "/Workbench",
            meta: {
              title: "见证工作台",
              key: "Workbench",
              fatherName: "witness",
              sidebarShow: true, // 是否显示侧边栏
              props: (route) => ({ query: route.query.id })
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/Workbench.vue"
              )
          }, {
            name: "blankPage",
            path: "/blankPage",
            meta: {
              title: "见证工作台",
              key: "blankPage",
              fatherName: "witness",
              sidebarShow: true, // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/blankPage.vue"
              )
          },
          {
            name: "MessageRecord",
            path: "/MessageRecord",
            meta: {
              title: "查看信息记录",
              key: "MessageRecord",
              fatherName: "witness",
              sidebarShow: false, // 是否显示侧边栏
              props: (route) => ({ query: route.query.id })
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/MessageRecord.vue"
              )
          },
          {
            name: "ViewingWitnessRecords",
            path: "/ViewingWitnessRecords",
            meta: {
              title: "查看见证资料",
              key: "ViewingWitnessRecords",
              fatherName: "witness",
              sidebarShow: true, // 是否显示侧边栏
              props: (route) => ({ query: route.query.id })
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/ViewingWitnessRecords.vue"
              )
          },
          {
            name: "ViewingWitnessData",
            path: "/ViewingWitnessData",
            meta: {
              title: "查看见证资料",
              key: "ViewingWitnessData",
              fatherName: "WitnessTaskManagement",
              sidebarShow: true, // 是否显示侧边栏
              props: (route) => ({ query: route.query.id })
            },
            component: () =>
              import(
                "../views/witness/ViewingWitnessData.vue"
              )
          },
          {
            name: "statistics",
            path: "/statistics",
            meta: {
              title: "见证统计分析",
              key: "System",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: {
              render: (c) => c("router-view")
            },
            children: [
              {
                name: "projectStatistics",
                path: "/projectStatistics",
                meta: {
                  title: "见证项目统计分析",
                  key: "projectStatistics",
                  fatherName: "statistics",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/statistics/projectStatistics.vue"
                    )
              },
              {
                name: "extraStatistics",
                path: "/extraStatistics",
                meta: {
                  title: "见证工作加班统计",
                  key: "extraStatistics",
                  fatherName: "statistics",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/statistics/extraStatistics.vue"
                    )
              },
            ]
          },
          {
            name: "statement",
            path: "/report",
            meta: {
              title: "见证报表管理",
              key: "System",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: {
              render: (c) => c("router-view")
            },
            children: [
              {
                name: "projectDatum",
                path: "/signIn",
                meta: {
                  title: "见证资料签收表",
                  key: "projectDatum",
                  fatherName: "statement",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/statement/projectDatum.vue"
                    )
              },
              {
                name: "projectDealDatum",
                path: "/transferRegistration",
                meta: {
                  title: "项目交易资料移交登记表",
                  key: "projectDealDatum",
                  fatherName: "statement",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/statement/projectDealDatum.vue"
                    )
              },
              {
                name: "FilingHandover",
                path: "/FilingHandover",
                meta: {
                  title: "项目归档资料移交清单表",
                  key: "FilingHandover",
                  fatherName: "statement",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () => import("../views/witness/statement/filingHandover.vue"),
                redirect:{
                  path:'/FilingHandover/list'
                },
                children:[
                  {
                    name: "FilingHandoverList",
                    path: "list",
                    meta: {
                      title: "项目归档资料移交清单表",
                      key: "FilingHandoverList",
                      fatherName: "FilingHandover",
                      sidebarShow: true // 是否显示侧边栏
                    },
                    component: () => import("../views/witness/statement/filingHandoverList.vue"),
                  },
                  {
                    name: "FilingHandoverDetail",
                    path: "detail",
                    meta: {
                      title: "详情",
                      key: "FilingHandoverDetail",
                      fatherName: "FilingHandover",
                      sidebarShow: true // 是否显示侧边栏
                    },
                    component: () => import("../views/witness/statement/filingHandoverDetail.vue"),
                  }
                ]
              },
            ]
          },
          //评标项目信息  /WitnessTaskManagerController
          {
            name: "WitnessTaskManagerController",
            path: "/WitnessTaskManagerController",
            meta: {
              title: "评标项目信息",
              key: "WitnessTaskManagerController",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/WitnessTaskManagerController/index.vue"
                )
          },

          {
            name: "managementSubsystem",
            path: "managementSubsystem",
            meta: {
              title: "综合管理子系统",
              key: "managementSubsystem",
              fatherName: "witness",
              sidebarShow: true, // 是否显示侧边栏
            },
            component: {
              render: (c) => c("router-view"),
            },
            children: [
              {
                name: "district",
                path: "/district",
                meta: {
                  title: "区域管理",
                  key: "district",
                  fatherName: "managementSubsystem",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/weeon/managementSubsystem/district/district.vue"
                    ),
              },
              {
                name: "roomManage",
                path: "/roomManage",
                meta: {
                  title: "房间管理",
                  key: "roomManage",
                  fatherName: "managementSubsystem",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/weeon/managementSubsystem/roomManage/room.vue"
                    ),
              },
              {
                name: "device",
                path: "/device",
                meta: {
                  title: "设备管理",
                  key: "device",
                  fatherName: "managementSubsystem",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/weeon/managementSubsystem/device/device.vue"
                    ),
              },
              {
                name: "broadcasttempl",
                path: "/broadcasttempl",
                meta: {
                  title: "广播模板配置",
                  key: "broadcasttempl",
                  fatherName: "managementSubsystem",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    "../views/witness/weeon/managementSubsystem/broadcasttempl/broadcasttempl.vue"
                    ),
              },
            ],
          },
          {
            name: "myWitness",
            path: "/myWitness",
            meta: {
              title: "我的见证",
              key: "myWitness",
              fatherName: "witness",
              sidebarShow: true, // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "WitnessTask" */
                "../views/witness/weeon/myWitness/index.vue"
                ),
            children: [
              {
                name: "toWitness",
                path: "toWitness",
                meta: {
                  title: "待见证",
                  fatherTitle: "我的见证",
                  key: "toWitness",
                  fatherName: "myWitness",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTask" */
                    "../views/witness/weeon/myWitness/toWitness.vue"
                    ),
              },{
                name: "inWitness",
                path: "inWitness",
                meta: {
                  title: "见证中",
                  fatherTitle: "我的见证",
                  key: "inWitness",
                  fatherName: "myWitness",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTask" */
                    "../views/witness/weeon/myWitness/inWitness.vue"
                    ),
              },
              {
                name: "suspendWitnessing",
                path: "suspendWitnessing",
                meta: {
                  title: "暂停见证",
                  fatherTitle: "我的见证",
                  key: "suspendWitnessing",
                  fatherName: "myWitness",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTask" */
                    "../views/witness/weeon/myWitness/suspendWitnessing.vue"
                    ),
              },
              {
                name: "completeWitnessing",
                path: "completeWitnessing",
                meta: {
                  title: "已完成",
                  fatherTitle: "我的见证",
                  key: "completeWitnessing",
                  fatherName: "myWitness",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTask" */
                    "../views/witness/weeon/myWitness/completeWitnessing.vue"
                    ),
              }
            ],
          },
          {
            name: "witnessStage",
            path: "/witnessStage",
            meta: {
              title: "见证阶段",
              key: "witnessStage",
              fatherName: "witness",
              sidebarShow: true, // 是否显示侧边栏
            },
            // props: (route) => ({ query: route.query.bdid }),
            component: () =>
              import(
                /* webpackChunkName: "WitnessTask" */
                "../views/witness/weeon/witnessStage/index.vue"
                ),
            children: [
              {
                name: "zbStage",
                path: "zbStage",
                meta: {
                  title: "招标阶段",
                  key: "zbStage",
                  fatherName: "witnessStage",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTaskManagement" */
                    "../views/witness/weeon/witnessStage/zbStage.vue"
                    ),
              },
              {
                name: "tbStage",
                path: "tbStage",
                meta: {
                  title: "投标阶段",
                  key: "tbStage",
                  fatherName: "witnessStage",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTaskManagement" */
                    "../views/witness/weeon/witnessStage/tbStage.vue"
                    ),
              },
              {
                name: "kbStage",
                path: "kbStage",
                meta: {
                  title: "开标阶段",
                  key: "kbStage",
                  fatherName: "witnessStage",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTaskManagement" */
                    "../views/witness/weeon/witnessStage/kbStage.vue"
                    ),
              },
              {
                name: "pbStage",
                path: "pbStage",
                meta: {
                  title: "评标阶段",
                  key: "pbStage",
                  fatherName: "witnessStage",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTaskManagement" */
                    "../views/witness/weeon/witnessStage/pbStage.vue"
                    ),
              },
              {
                name: "dbStage",
                path: "dbStage",
                meta: {
                  title: "定标阶段",
                  key: "dbStage",
                  fatherName: "witnessStage",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTaskManagement" */
                    "../views/witness/weeon/witnessStage/dbStage.vue"
                    ),
              },
              {
                name: "lyStage",
                path: "lyStage",
                meta: {
                  title: "履约阶段",
                  key: "lyStage",
                  fatherName: "witnessStage",
                  sidebarShow: true, // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "WitnessTaskManagement" */
                    "../views/witness/weeon/witnessStage/lyStage.vue"
                    ),
              },
            ],
          },
          {
            name: "witnessTaskManager",
            path: "/witnessTaskManager",
            meta: {
              title: "见证任务管理",
              key: "witnessTaskManager",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "WitnessTaskManagement" */
                "../views/witness/weeon/buss/task/gly/index.vue"
                ),
            children: [
              {
                name: "taskAllocation",
                path: "/taskAllocation",
                meta: {
                  title: "见证任务分配",
                  key: "taskAllocation",
                  fatherName: "witnessTaskManager",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    // "../views/witness/weeon/managementSubsystem/roomManage/room.vue"
                    "../views/witness/weeon/buss/task/jzfp/list.vue"
                    )
              },
              {
                name: "taskManager",
                path: "/taskManager",
                meta: {
                  title: "见证任务管理",
                  key: "taskManager",
                  fatherName: "witnessTaskManager",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    // "../views/witness/weeon/managementSubsystem/roomManage/room.vue"
                    "../views/witness/weeon/buss/task/gly/list.vue"
                    )
              },
            ],
          },
          {
            name: "userManager",
            path: "/userManager",
            meta: {
              title: "人员信息管理",
              key: "userManager",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "WitnessTaskManagement" */
                "../views/witness/weeon/buss/task/gly/userManagerTitle.vue"
                ),
            children: [
              {
                name: "zbrjdl",
                path: "/zbrjdl",
                meta: {
                  title: "招标人及代理",
                  key: "zbrjdl",
                  fatherName: "userManager",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    // "../views/witness/weeon/managementSubsystem/roomManage/room.vue"
                    "../views/witness/weeon/buss/task/gly/zbrjdl.vue"
                    )
              },
              // {
              //   name: "zbrjdl",
              //   path: "/zbrjdl",
              //   meta: {
              //     title: "招标人及代理",
              //     key: "zbrjdl",
              //     fatherName: "userManager",
              //     sidebarShow: true // 是否显示侧边栏
              //   },
              //   component: () =>
              //     import(
              //       /* webpackChunkName: "witness" */
              //       // "../views/witness/weeon/managementSubsystem/roomManage/room.vue"
              //       "../views/witness/weeon/buss/task/gly/zbrjdl.vue"
              //       )
              // },
              {
                name: "pszj",
                path: "/pszj",
                meta: {
                  title: "评审专家",
                  key: "pszj",
                  fatherName: "userManager",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    // "../views/witness/weeon/managementSubsystem/roomManage/room.vue"
                    "../views/witness/weeon/buss/task/gly/pszj.vue"
                    )
              },
              {
                name: "jdry",
                path: "/jdry",
                meta: {
                  title: "监督人员",
                  key: "jdry",
                  fatherName: "userManager",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    "../views/witness/weeon/buss/task/gly/jdry.vue"
                    )
              },
              {
                name: "gzry",
                path: "/gzry",
                meta: {
                  title: "工作人员",
                  key: "gzry",
                  fatherName: "userManager",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    // "../views/witness/weeon/managementSubsystem/roomManage/room.vue"
                    "../views/witness/weeon/buss/task/gly/gzry.vue"
                    )
              },
              {
                name: "qtry",
                path: "/qtry",
                meta: {
                  title: "其他人员",
                  key: "qtry",
                  fatherName: "userManager",
                  sidebarShow: true // 是否显示侧边栏
                },
                component: () =>
                  import(
                    /* webpackChunkName: "witness" */
                    // "../views/witness/weeon/managementSubsystem/roomManage/room.vue"
                    "../views/witness/weeon/buss/task/gly/qtry.vue"
                    )
              }
            ],
          },
          {
            name: "allocationbdlist",
            path: "/allocationbdlist",
            meta: {
              title: "见证人分配",
              key: "allocationbdlist",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/weeon/buss/task/jzfp/jdlist.vue"
                )
          },
          {
            name: "warningSetup",
            path: "/warningSetup",
            meta: {
              title: "预警点设置",
              key: "warningSetup",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/weeon/buss/warning/list.vue"
                )
          },
          {
            name: "warninginfo",
            path: "/warninginfo",
            meta: {
              title: "预警信息",
              key: "warninginfo",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "WitnessTaskManagement" */
                "../views/witness/weeon/buss/warninginfo/dcllist.vue"
                )
            // children: [
            //   {
            //     name: "dclwarninginfo",
            //     path: "/dclwarninginfo",
            //     meta: {
            //       title: "预警信息",
            //       key: "dclwarninginfo",
            //       fatherName: "warninginfo",
            //       sidebarShow: true // 是否显示侧边栏
            //     },
            //     component: () =>
            //       import(
            //         /* webpackChunkName: "witness" */
            //         // "../views/witness/weeon/managementSubsystem/roomManage/room.vue"
            //         "../views/witness/weeon/buss/warninginfo/dcllist.vue"
            //         )
            //   },
            //   {
            //     name: "yclwarninginfo",
            //     path: "/yclwarninginfo",
            //     meta: {
            //       title: "预警信息",
            //       key: "yclwarninginfo",
            //       fatherName: "warninginfo",
            //       sidebarShow: true // 是否显示侧边栏
            //     },
            //     component: () =>
            //       import(
            //         /* webpackChunkName: "witness" */
            //         // "../views/witness/weeon/managementSubsystem/roomManage/room.vue"
            //         "../views/witness/weeon/buss/warninginfo/ycllist.vue"
            //         )
            //   },
            // ],
          },
          {
            name: "sxgl",
            path: "/sxgl",
            meta: {
              title: "见证事项",
              key: "sxgl",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/weeon/sxgl/sxgl.vue"
                )
          },
          {
            name: "createCertificate",
            path: "/createCertificate",
            meta: {
              title: "出证申请",
              key: "createCertificate",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/weeon/buss/certificate/add.vue"
                )
          },
          {
            name: "certificateList",
            path: "/certificateList",
            meta: {
              title: "出证申请管理",
              key: "certificateList",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/weeon/buss/certificate/list.vue"
                )
          },
          {
            name: "jyjzslist",
            path: "/jyjzslist",
            meta: {
              title: "交易见证书",
              key: "jyjzslist",
              fatherName: "witness",
              sidebarShow: true // 是否显示侧边栏
            },
            component: () =>
              import(
                /* webpackChunkName: "witness" */
                "../views/witness/weeon/buss/certificate/czlist.vue"
                )
          },
        ]
      }
      // {
      //   path: "*",
      //   component: {
      //     render: (h) => h("h1", {}, "NotFound"),
      //   },
      // },
    ]
  }
  // {
  //   path: "*",
  //   component: {
  //     render: (h) => h("h1", {}, "Not Found"),
  //   },
  // },
];
const router = new VueRouter({
  routes
});
export default router;
